package com.yss.factory;

import com.yss.strategy.LoginStrategy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description:登录策略工厂类
 * @Author:yss
 * @Date:2024/7/23 21:44
 */
@Component
public class LoginStrategyFactory {
    @Autowired
    private Map<String,LoginStrategy> loginStrategyMap=new HashMap<>();
    public LoginStrategy getInstance(String loginType){
        return loginStrategyMap.get(loginType);
    }
}
